(function () {
    var module = {};
    var tools = Tools();

    var result=tools.getParam('result');
    var bizCode=tools.getParam('bizCode');
    //var message=tools.getParam('message');
    var typeName;



    module.init=function () {
        tools.getUserInfo();
     //openAccount    //开户   recharge   //充值     withdraw  //   changeBankCard'){ //绑卡换卡  unbindBankCard'){ //解卡
    //invest'){ //投资
        $(function () {

            //开户  //绑卡换卡
            if(bizCode=='openAccount'||bizCode=='changeBankCard'){
                if(bizCode=='openAccount'){
                    typeName='开户'
                }else{
                    typeName="绑卡"
                }
                if(result=='SUCCESS'){
                    $('#resultFirst').text('我要充值');
                    $('#resultFirst').attr('href',accountURL+'recharge.html');

                }
            }

            //提现   //解卡  //chongzhi
            if(bizCode=='withdraw'||bizCode=='unbindBankCard'||bizCode=='resetPassword'||bizCode=='recharge'){
                if(bizCode=='withdraw'){
                    typeName='提现'
                }else if(bizCode=='unbindBankCard'){
                    typeName="解卡"
                }else if(bizCode=='recharge'){
                    typeName="充值";
                }else{
                    typeName="密码修改"
                }
                if(result=='SUCCESS'){
                  $('.oa_btAll').hide();
                    $('#resultOther').show();
                    $('#resultWc').attr('href','center.html')
                }
            }

            //投资
            if(bizCode=='invest'){
                typeName="投资";
                if(result=='SUCCESS'){
                    $('#resultFirst').text('继续投资');
                    $('#resultFirst').attr('href',tools.goInvest);

                }
            }
            if(result=='SUCCESS'){
                $('.oa_info').html(typeName+'成功');
            }else{
                $('.oa_info').html(typeName+'失败');
            }

            if(result=='SUCCESS'){
                $('.oa_log').addClass('oa_success');
                $('#resultSecond').attr('href','center.html');
                $('#resultSecond').text('完成');
            }else{
                $('.oa_log').addClass('oa_fail');
                $('.oa_btAll').hide();
                $('#resultOther').show();
                $('#resultWc').attr('href','center.html')
            }
        })

    };


    module.init();
})();